import request from '../utils/request';//axios方法封装

//物料列表
export const ShowMaterial = query => {
    return request({
        url: 'ShowMaterial',
        method: 'get',
        params: query//get :param参数
    });
};

export const Materialtype = query => {
    return request({
        url: 'Materialtype',
        method: 'get',
        params: query//get :param参数
    });
};

export const UplodsAsync = data => {
    return request({
        url: 'UplodsAsync',
        method: 'post',
        data: data//get :param参数
    });
};
export const AddMaterial = data => {
    return request({
        url: 'AddMaterial',
        method: 'post',
        data: data//get :param参数
    });
};
//物料详情
export const MaterialDetails = query => {
    return request({
        url: 'SelectMaterialById?id='+query,
        method: 'get',
        params: query//get :param参数
    });
};
//物料下载导出Excl
export const  download= data=> {
    return request({
        responseType: 'blob', // 重点，responseType设置为 blob
        url:'api/CodingExcel/download',
        method: 'get',
        data:data
    });
}